import {createPinia, defineStore} from 'pinia'
import {ref} from 'vue'

export const useUserInfoStore = defineStore('userInfo',() => {
    const userInfo = ref({})

    const setUserInfo = (data) => {
        userInfo.value = data
    }

    const removeUserInfo = () => {
        userInfo.value = {}
    }

    return {
        userInfo,
        setUserInfo,
        removeUserInfo
    }

}, {persist: true})